<?php 



if ($this->operation=="Copy") {

	$targetPortalId=getParameter("targetportal");
	if ($targetPortalId=="none") $targetPortalId=null;
	/*CopyContents("key_m",$targetPortalId);
	header("Location:".createRelativeUrl("operation","list"));*/
	$id=getParameter("ButterflyPortal_sys_rec");
	
	CopyContent($id, $targetPortalId);
	
	header("Location: index.php?table=portal_content&filter=1&succes=Copy Successful");
}

if (getParameter("operation")=="tag") {

	$contenttag=getParameter("contenttag");
	if ($contenttag!="none") {
	TagContents("key_m",$contenttag);
	header("Location:".createRelativeUrl("operation","list"));
	}
}

if (getParameter("operation")=="rights") {

    $groupId=getParameter("targetgroup");
    $right=getParameter("right");
    if ($groupId=="none") $groupId=null;
    SetRights("key_m",getObjByKey("portal_objects","id","name","portal_content"),$groupId,$right);
    header("Location:".createRelativeUrl("operation","list"));
}

if (getParameter("operation")=="movepage")  MoveObject(getParameter("objectid"),getParameter("direction"),"portal_content");
/*
*/
?>



